<template>
	<div id='StudentShareList'>
		<template v-if="dataList.length>0">
			<div class="student_share_list" :style="{padding:audioType?'.32rem':'.32rem 0',margin:audioType?'initial':' 0 .32rem '}" v-for="item,index in dataList">
				<img class="student_share_list_img" :class="videoComment?'student_share_list_img_video':''" :src="item.avatar" alt="" />

				<div v-if="videoComment" class="student_share_list_right student_share_list_right_top">
					<div class="student_share_list_right_top_f">
						<div class="student_share_list_right_top_left">
							<div class="student_share_list_name c_text_ellipsis_1">
								<div class="student_share_list_name_name" style="line-height: .34rem;">{{item.nick_name}}</div>
								<img v-if="item.member == 1" class="student_share_list_name_img"  src="../../assets/vip_2.png" alt="" />
							</div>
							<div class="student_share_list_time" style="padding: .08rem 0 0 0;">{{item.newTime}}</div>
						</div>
						<div class="student_share_list_right_top_right">
							<img @click="zanClick(item,index)" class="student_share_list_right_top_right_img" v-if="item.liked == 1" src="../../assets/bd_img/zan.png" alt="" />
							<img @click="zanClick(item,index)" class="student_share_list_right_top_right_img" v-else src="../../assets/zanzan.png" alt="" />
							<div class="student_share_list_right_top_right_num" :style="{color:item.liked == 1?'#DCBBC9':'#999999'}">{{item.like_count}}</div>
						</div>
					</div>
					<div class="student_share_list_share" style="margin-top: .32rem;">{{item.content}}</div>

				</div>

				<div v-else class="student_share_list_right">
					<div class="student_share_list_name c_text_ellipsis_1">{{item.nick_name}}</div>
					<div class="student_share_list_time">{{item.newTime}}</div>
					<div class="student_share_list_share">{{item.content}}</div>
				</div>

			</div>
		</template>

	</div>
</template>

<script>
	export default {
		name: 'StudentShareList',
		props: {
			dataList: {
				default: function() {
					return []
				},
			},
			videoComment: {
				default: false
			},
			audioType: {
				default: false,
			}

		},
		components: {

		},
		data() {
			return {

			}
		},
		created() {},
		watch: {

		},
		computed: {

		},
		mounted() {
			document.title = ''
		},
		methods: {
			zanClick(item,index){
				item.index = index 
				this.$emit('zanClick',item)
			}
		}
	}
</script>

<style lang="scss">
	@import './StudentShareList.scss';
</style>